package com.xjc.infra.entity;

import com.xjc.infra.db.Pager;
import com.xjc.infra.entity.enums.SortOrder;



public class MiniDataGridParams {
	
	/**
	 * 页码
	 */
	private int pageIndex;
	/**
	 * 每页多少条
	 */
	private int pageSize;
	/**
	 * 排序字段
	 */
	private String sortField;
	/**
	 * 排序方向
	 */
	private SortOrder sortOrder;
	/**
	 * 总记录数
	 */
	private int totalCount;
	
	public Pager getPager(){
		Pager pager = new Pager();
		pager.setPageNumber(pageIndex+1);
		pager.setPageSize(pageSize);
		pager.setRecordCount(totalCount);
		return pager;
	}
	
	public int getPageIndex() {
		return pageIndex;
	}
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public String getSortField() {
		return sortField;
	}
	public void setSortField(String sortField) {
		this.sortField = sortField;
	}
	public SortOrder getSortOrder() {
		return sortOrder;
	}
	public void setSortOrder(SortOrder sortOrder) {
		this.sortOrder = sortOrder;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	
	
	
	
	
	
	

}
